/**
 * Created by Administrator on 2019/6/9.
 */
var t = document.querySelector("#li");
window.onscroll=function () {
    console.log(document.documentElement.scrollTop > 100 ||document.documentElement.scrollTop > 100);
    if (document.documentElement.scrollTop > 100 ||document.documentElement.scrollTop > 100){
        t.style.position="fixed";
        t.style.top = "120px";
    }else {
        t.style.position="static";
    }
}
t.addEventListener('click',function () {
    window.scrollTo({
        top:0,
        behavior:'smooth'
    })
})